﻿using System;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;

namespace HengTong.Model.Db.System;

/// <summary>
/// 短信记录
/// </summary>
public class SysSmsAuthLog : BasePoco
{
    [Display(Name = "手机号码", Description = "接收短信的手机号", GroupName = "基本信息")]
    [MaxLength(255)]
    public string Phone { get; set; }

    [Display(Name = "推送内容", Description = "短信推送内容", GroupName = "推送信息")]
    [MaxLength(1024)]
    public string Context { get; set; }

    [Display(Name = "推送结果", Description = "短信推送状态", GroupName = "推送信息")]
    public PushStateEnum State { get; set; }

    [Display(Name = "错误消息", Description = "推送失败时的错误信息", GroupName = "推送信息")]
    public string Message { get; set; }

    [Display(Name = "短信时间", Description = "短信推送时间", GroupName = "推送信息")]
    public DateTime? SmsTime { get; set; }
    
}

public enum PushStateEnum
{
    创建 = 0,
    成功 = 10,
    失败 = 20
}